cmake_minimum_required(VERSION 3.10)
project(MyTests)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(GTest REQUIRED)

## `ctest` 需要这个来开启
enable_testing()

add_executable(unitTest_rm_const_etc unitTest_rm_const_etc.cpp)  

target_link_libraries(unitTest_rm_const_etc GTest::GTest GTest::Main)
# target_link_libraries(MyTests gtest gtest_main)
message(${CMAKE_SOURCE_DIR})
message(${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME unitTest_rm_const_etc 
        COMMAND unitTest_rm_const_etc
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/)

